// 包含敏感信息的JavaScript文件

// 云存储配置
const cloudConfig = {
    accessKey: "AKIAEXAMPLE123456789",
    secretKey: "SECRETEXAMPLEKEY12345678901234567890",
    bucket: "my-private-bucket",
    region: "us-east-1"
};

// 数据库连接字符串
const dbConnection = {
    url: "mongodb://admin:password123@192.168.1.50:27017/mydb",
    options: {
        auth: {
            user: "dbuser",
            password: "dbpass123"
        }
    }
};

// 文件上传配置
const uploadSettings = {
    uploadPath: "/var/www/uploads/",
    tempDir: "/tmp/uploads/",
    maxSize: 10485760,
    allowedTypes: ["jpg", "png", "pdf", "doc"]
};

// API端点配置
const apiEndpoints = {
    upload: "http://10.0.0.100:3000/api/v1/upload",
    download: "http://192.168.100.50/files/",
    admin: "http://localhost:8080/admin"
};

// 用户认证信息
const authData = {
    username: "testuser",
    password: "testpass123",
    token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    refreshToken: "refresh_token_secret_here"
};

// 函数：处理文件上传
function handleFileUpload(file) {
    const uploadUrl = "/api/v1/upload";
    const formData = new FormData();
    formData.append('file', file);
    formData.append('path', '/user_uploads/');
    
    return fetch(uploadUrl, {
        method: 'POST',
        body: formData,
        headers: {
            'Authorization': 'Bearer ' + authData.token
        }
    });
}

// 函数：连接到内部服务
function connectToInternalService() {
    const internalApi = "http://172.16.0.100:9000/internal-api";
    const credentials = {
        serviceUser: "service_account",
        servicePass: "service_password_123"
    };
    
    return fetch(internalApi, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify(credentials)
    });
}
